FROM python:3.8.3
RUN sed -ri -e 's!http://deb\.debian\.org/debian!http://mirrors\.aliyun\.com/debian!g' /etc/apt/sources.list
RUN sed -ri -e 's!http://security\.debian\.org/debian-security!http://mirrors\.aliyun\.com/debian-security!g' /etc/apt/sources.list

RUN apt-get update && apt-get install -y \
    vim \
    curl

RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && dpkg-reconfigure --frontend noninteractive tzdata 


ADD . /code
WORKDIR /code
RUN pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
RUN pip install uwsgi -i https://mirrors.aliyun.com/pypi/simple/

#CMD curl http://110.43.42.65:33380/qsJxBeEbUyjxw0km/official-website/backadmin/settings.py -o /code/tmcxop_datasyn/settings.py &&service cron start &&python manage.py crontab add #&&python manage.py runserver 0:8001